package com.jingantech.ngiam;

/**
 * Created by fuzhong on 2017/1/9.
 */
public class RequestBody {

    private String url;
    private String ticket;
    private Format format;
    private String service;

    public RequestBody(String url, String ticket, String service, Format format) {
        this.url = url;
        this.ticket = ticket;
        this.format = format;
        this.service = service;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getTicket() {
        return ticket;
    }

    public void setTicket(String ticket) {
        this.ticket = ticket;
    }

    public Format getFormat() {
        return format;
    }

    public void setFormat(Format format) {
        this.format = format;
    }

    public String getService() {
        return service;
    }

    public void setService(String service) {
        this.service = service;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(url).append("?");
        sb.append("ticket=").append(ticket);
        sb.append("&format=").append(format.name());
        sb.append("&service=").append(service);
        return sb.toString();
    }
}
